package com.xlk.cxf.test;

import javax.xml.ws.Endpoint;

import com.xlk.cxf.service.impl.HelloWorldService;
/**
 * 
 * 发布CXF WebService  </br> 
 * 类名: DeployHelloWorldService </br> 
 * 日期: 2014-2-18 下午02:24:27 </br> 
 * @author 许立亢 
 * @version 1.0
 */
public class DeployHelloWorldService {
	/** * <b>function:</b>发布WebService * @author hoojo */
	public static void deployService() {
		System.out.println("Server start ……");
		HelloWorldService service = new HelloWorldService();
		//這個地址可以隨便填寫
		String address = "http://localhost:9000/helloWorld";
		Endpoint.publish(address, service);
	}

	public static void main(String[] args) throws InterruptedException {
		// 发布WebService 
		deployService(); 
		System.out.println("server ready ……");
//		Thread.sleep(1000 * 60);
		System.out.println("server exiting");
		// //休眠60秒后就退出 
//		System.exit(0);
	}

}
